package com.plexpt.chatgptonlinejava.config;

import org.redisson.api.RedissonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

import javax.annotation.Resource;

@Configuration
public class RedisConfig {

    @Resource
    private ZzRedisProperties zzRedisProperties;

    @Order(0)
    @Bean
    public RedissonClient zzRedissonClient() {
        return NrRedis.createClient(zzRedisProperties);
    }
}